<template>
	<view class="pageBg">
	<!-- #ifndef MP-TOUTIAO -->
	<custom-nav-bar title="分类"></custom-nav-bar>
	<!-- #endif -->
		<view class="classify">
			<themeItem v-for="item in classifyList"
			:key="item._id"
			:item="item"></themeItem>
		</view>
		<view class="footer">没有更多数据了</view>
	</view>

</template>

<script setup>
	import { ref } from 'vue';
	import {onShareAppMessage,onShareTimeline} from "@dcloudio/uni-app"
	import {apiGetClassify} from "@/api/apis.js"
	const classifyList = ref([]);

	const getClassify =async()=>{
		let res =await apiGetClassify({
			pageSize:10
		});
		classifyList.value = res.records
		console.log(res);
	}


	//分享给好友
	onShareAppMessage((e)=>{
		return {
			title:"yuhaowallpaper，精选分类",
			path:"/pages/classify/classify"
		}
	})

	//分享朋友圈
	onShareTimeline(()=>{
		return {
			title:"yuhaowallpaper，精选分类"
		}
	})


	getClassify();
</script>

<style lang="scss" scoped>
.classify{
	padding: 25rpx 30rpx;
	display: grid;
	gap: 15rpx;
	grid-template-columns: repeat(3, 1fr);
}

.pageBg{
	background:
	linear-gradient(to bottom,transparent,#fff 400rpx),
	linear-gradient(to right,#beecd8 20%,#F4E2D8);
	min-height: 80vh;
	
	.footer{
		
	}
}
</style>
